﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.IO;
using CEED.Utils;

namespace CEED_Mini
{
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct RomFSLevel
    {
        public long LogicOffset;
        public long Size;
        public uint BlockSize;
        public uint Reserved;
    }
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct RomFSHeader
    {
        public uint Signature;
        public uint Id;
        public uint Level0Size;
        public RomFSLevel Level1;
        public RomFSLevel Level2;
        public RomFSLevel Level3;
        public uint Size;
        public uint Reserved;
    }

    class RomFS
    {
        public RomFSHeader Header;

        public RomFS(Stream stream)
        {
            Header = StructReader.ReadStruct<RomFSHeader>(stream);
        }
    }
}
